package operation.iterator;

import java.util.Iterator;
import java.util.List;

import operation.iterator.abs.ICollege;
import operation.iterator.obj.Department;

public class OutputHelper {
    List<ICollege> univeristy;

    public OutputHelper(List<ICollege> university) {
        this.univeristy = university;
    }

    public void display() {
        for (ICollege elm : univeristy) {
            Iterator<Department> iterator = elm.iterator();
            while (iterator.hasNext()) {
                System.out.println(iterator.next().getName());
            }
        }
    }
}